Re: [NTG-context] Spacing in \unit - SOLVED

2022-10-12 Thread Gavin via ntg-context
bably too large, > but I think that a little more space than you currently have would be > better. I haven’t adjusted the space directly. I just changed the \times and \cdot from class binom to class ord. I’m not going to tweak the space. I don’t even use this font. With proportional numbers i

Re: [NTG-context] upload

2022-07-09 Thread Hans Hagen via ntg-context
On 7/9/2022 12:40 AM, Otared Kavian via ntg-context wrote: I just found that \choose has been replaced with \binom (binomial coefficient): \starttext \meaning\choose \meaning\binom $\binom{n}{k}$ \stoptext Sorry for complaining… :-) no problem ... maybe we should have a wiki page for 'use

Re: [NTG-context] upload

2022-07-08 Thread Otared Kavian via ntg-context
I just found that \choose has been replaced with \binom (binomial coefficient): \starttext \meaning\choose \meaning\binom $\binom{n}{k}$ \stoptext Sorry for complaining… :-) > On 9 Jul 2022, at 00:34, Otared Kavian wrote: > > > >> On 6 Jul 2022, at 22:10, Hans Hag

Re: [NTG-context] \binom has fraction line

2021-03-16 Thread Hans Hagen
On 3/16/2021 3:11 PM, Jacob Kauffmann wrote: Dear list, lmtx draws a fraction line in \binom{n}{k}, ConTeXt ver: 2021.02.23 17:47 LMTX fmt: 2021.2.26 int: english/english The same happens with {n \choose k}. The other version I tested draws it correctly (without the bar

[NTG-context] \binom has fraction line

2021-03-16 Thread Jacob Kauffmann
Dear list, lmtx draws a fraction line in \binom{n}{k}, ConTeXt ver: 2021.02.23 17:47 LMTX fmt: 2021.2.26 int: english/english The same happens with {n \choose k}. The other version I tested draws it correctly (without the bar): ConTeXt ver: 2019.03.21 21:39 MKII fmt: 2019.11.14

[NTG-context] Bug with lmtx and color in table

2020-07-22 Thread Fabrice Couvreur
\binom{n-1}{k-1}} \stopxcell \startxcell[width=fit] \m{+} \stopxcell \startxcell \m{\displaystyle\binom{n-1}{k}} \stopxcell \stopxrow \startxrow \startxcell \stopxcell

Re: [NTG-context] Code lua in a table

2020-07-21 Thread Fabrice Couvreur
}]}] \starttabulate [|p|r|] \NC\NC #2 \NC\NR \NC #1 \NC\NC\NR \stoptabulate } \starttext \startluacode function Binom(n,k) if k > n then return "" elseif (n == 0 or k == 0) then return 1 else return

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Jeong Dal
. Best regards, Dalyoung > 2020. 7. 20. 오후 5:36, Hans Hagen 작성: > > On 7/20/2020 7:56 AM, Jeong Dal wrote: >> Dear Fabrice, >> You may split Binom(n,k) function into two functions as following: > > see original mail > > >> Dalyoung > Best stay in a

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Fabrice Couvreur
Dal wrote: > > Dear Fabrice, > > > > You may split Binom(n,k) function into two functions as following: > > > > see original mail > > > > Dalyoung > Best stay in a protected namespace ... > > \startluacode > > local function fact (n) >

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Jeong Dal
Dear Fabrice, You may split Binom(n,k) function into two functions as following: * \startluacode P={} combi = P function P.fact (n) if n <= 0 then return 1 else return n * P.fact(n-1) end end function P.ncr(n,r) return P.fact(n)/(P.fact(r)*P.fact(n-r)) end co

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Hans Hagen
On 7/20/2020 7:56 AM, Jeong Dal wrote: Dear Fabrice, You may split Binom(n,k) function into two functions as following: > see original mail > Dalyoung Best stay in a protected namespace ... \startluacode local function fact (n) if n <= 0 then return 1

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Otared Kavian
to use context(...) here? >> How not to display the .0 ? Or even better, you can return an integer in your Binom function: return math.round((n*Binom(n-1,k-1))/k) Best regards: Otared ___ If your qu

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Otared Kavian
ggested, ou can also use context(math.round(Binom(i,j))) to have integers instead of real numbers. Best regards: Otared ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : n

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 18.07.2020 um 22:25: Hi Wolfgang, It works but why did you ask this question since I finally use context ? Are you sure you want to use context(...) here? In your first version you used the context function in the loop to print the output of the Binom

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Fabrice Couvreur
Small correction : \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k == 0) then return 1 else return (n*Binom(n-1,k-1))/k end end context.startxtable({"align={mid

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Fabrice Couvreur
abrice Couvreur schrieb am 18.07.2020 um 22:09: > > Hi, > > I improved the code to be able to display the grid but I cannot display > > the coefficients. > > Thank you > > Fabrice > > > > \starttext > > > > \startluacode > >

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 18.07.2020 um 22:09: Hi, I improved the code to be able to display the grid but I cannot display the coefficients. Thank you Fabrice \starttext \startluacode      function Binom(n,k)        if k > n then              return 0        elseif (n == 0 or k =

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Fabrice Couvreur
Hi, I improved the code to be able to display the grid but I cannot display the coefficients. Thank you Fabrice \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k == 0) then return 1 else ret

Re: [NTG-context] Code lua in a table

2020-07-18 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 18.07.2020 um 20:05: Hello, I want to display the values of Pascal's triangle in a table. Unfortunately my knowledge of Lua is not sufficient to run this code. Thank you. Fabrice \starttext \startluacode      function Binom(n,k)      if k >

[NTG-context] Code lua in a table

2020-07-18 Thread Fabrice Couvreur
Hello, I want to display the values of Pascal's triangle in a table. Unfortunately my knowledge of Lua is not sufficient to run this code. Thank you. Fabrice \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k =

Re: [NTG-context] Fwd: Re: The binomial coefficients do not look optimal

2017-09-05 Thread Mikael P. Sundqvist
>> Hi, >> >> I stumbled upon this (see the attached file for the result): >> >> %%% Test file >> \setupbodyfont[10pt] >> \starttext >> \startTEXpage[offset=10pt] >> \type{\tbinom{n}{k}}: $\tbinom

[NTG-context] Fwd: Re: The binomial coefficients do not look optimal

2017-09-02 Thread Hans Hagen
xt \startTEXpage[offset=10pt] \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical space between $n$ and $k$ is too big) \par \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not lo

Re: [NTG-context] The binomial coefficients do not look optimal

2017-09-02 Thread Mikael P. Sundqvist
arttext >> \startTEXpage[offset=10pt] >> \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical >> space between $n$ and $k$ is too big) \par >> \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par >> \type{\dbinom{n}{k}}: $\dbinom{n

Re: [NTG-context] The binomial coefficients do not look optimal

2017-09-01 Thread Hans Hagen
big) \par \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too big parenthesis, even for displayed formulas).\par \stopTEXpage \stoptext %%% End of test file I think something should be changed to get the binomial coefficients

[NTG-context] The binomial coefficients do not look optimal

2017-09-01 Thread Mikael P. Sundqvist
Hi, I stumbled upon this (see the attached file for the result): %%% Test file \setupbodyfont[10pt] \starttext \startTEXpage[offset=10pt] \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical space between $n$ and $k$ is too big) \par \type{\binom{n}{k}}: $\binom{n}{k}$ (looks

Re: [NTG-context] Fractions and binomial inlined in text ($n \choose \frac{n}2$): Parentheses not scaled

2011-12-04 Thread Wolfgang Schuster
can use \binom which is the recommended way in context. The \dbinom command sets the content in display style while \tbinom use textstyle. \starttext Using \tex{binom} in text $\binom{n}{\frac{n}{2}}$. Using \tex{dbinom} in text $\dbinom{n}{\frac{n}{2}}$. Using \tex{tbinom} in text $\tbinom{n

Re: [NTG-context] [solved] Fractions and binomial inlined in text ($n \choose \frac{n}2$): Parentheses not scaled

2011-12-04 Thread Paul Menzel
limitation and therefore expected? Instead if \choose you can use \binom which is the recommended way in context. The \dbinom command sets the content in display style while \tbinom use textstyle. \starttext Using \tex{binom} in text $\binom{n}{\frac{n}{2}}$. Using \tex{dbinom

[NTG-context] \environment before vs. after \startproduct

2011-07-16 Thread Andreas Harder
Hi, here is another problem regarding \environments. % \setupbodyfont[palatino] % OK \starttext \setupbodyfont[palatino] % not OK \startformula \binom{n}{0} \stopformula \stoptext To avoid it, I'd have to use something like the following? \environment font-setups \startproduct

Re: [NTG-context] \environment before vs. after \startproduct

2011-07-16 Thread Wolfgang Schuster
Am 16.07.2011 um 15:00 schrieb Andreas Harder: Hi, here is another problem regarding \environments. % \setupbodyfont[palatino] % OK \starttext \setupbodyfont[palatino] % not OK \startformula \binom{n}{0} \stopformula \stoptext To avoid it, I'd have to use something like

Re: [NTG-context] Simplefonts, latest beta and binoms

2011-05-24 Thread Wolfgang Schuster
Math? No but you can use my calluna typescripts: \usetypescriptfile[type-calluna] \definetypeface[mainface][rm][serif][calluna][default] \definetypeface[mainface][mm][math] [modern] [computer-modern] \setupbodyfont[mainface] \starttext Calluna and Latin Modern Math \startformula \binom{1}{2

[NTG-context] Simplefonts, latest beta and binoms

2011-05-23 Thread Cedric Mauclair
the math font doesn't help either. \usemodule[simplefonts] \setmainfont[Calluna]% could be Latin Modern Roman %\setmathfont[Latin Modern Math]% as in t-simplefonts.tex \starttext \startformula \binom{1}{2} \stopformula \stoptext Regards. -- Cédric simplefonts-error.tex Description: TeX

Re: [NTG-context] Simplefonts, latest beta and binoms

2011-05-23 Thread Wolfgang Schuster
fonts which are used when you use the simplefonts module: \definetypeface[mainface][rm][serif][modern] \definetypeface[mainface][mm][math] [modern] \setupbodyfont[mainface] \starttext \startformula \binom{1}{2} \stopformula \stoptext Wolfgang

Re: [NTG-context] Simplefonts, latest beta and binoms

2011-05-23 Thread Cedric Mauclair
][mm][math] [modern] \setupbodyfont[mainface] \starttext  \startformula   \binom{1}{2}  \stopformula \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry

Re: [NTG-context] Simplefonts, latest beta and binoms

2011-05-23 Thread Aditya Mahajan
the fault of the OpenType version of the LM Math fonts which are used when you use the simplefonts module: \definetypeface[mainface][rm][serif][modern] \definetypeface[mainface][mm][math] [modern] \setupbodyfont[mainface] \starttext \startformula \binom{1}{2} \stopformula \stoptext If I don't

Re: [NTG-context] Simplefonts, latest beta and binoms

2011-05-23 Thread Cedric Mauclair
[mainface] \starttext \startformula \binom{1}{2} \stopformula \stoptext After perusing the log file, here are the font files that are loaded: /DATA/context-minimals/tex/texmf/fonts/opentype/public/lm/lmmath.otf /DATA/context-minimals/tex/texmf/fonts/opentype/public/lm/lmroman10

Re: [NTG-context] Simplefonts, latest beta and binoms

2011-05-23 Thread Wolfgang Schuster
or LuaTeX because it does only appear with OpenType math fonts: Input: \usemodule[simplefonts] \setmainfont[Calluna] \startbuffer[example] \input ward\par \startformula c^2=a^2+b^2 \quad \binom{1}{2} \stopformula \stopbuffer \starttext \getbuffer[example] \setmathfont[palatino]\getbuffer

Re: [NTG-context] Simplefonts, latest beta and binoms

2011-05-23 Thread Cedric Mauclair
[example] \input ward\par \startformula c^2=a^2+b^2 \quad \binom{1}{2} \stopformula \stopbuffer \starttext \getbuffer[example] \setmathfont[palatino]\getbuffer[example] \setmathfont[euler]\getbuffer[example] \setmathfont[times]\getbuffer[example] \setmathfont[cambria]\getbuffer[example

[NTG-context] beta (asana goodies)

2011-03-26 Thread Andreas Harder
Hi Hans, with the latest beta asana-math.lfg don't seem to have any influence of the output. \setupbodyfont[asana] \startTEXpage[offset=1ex] $\binom{n}{k}\quad \dbinom{n}{k}$ \stopTEXpage It used to work with the experimental two or three days ago. Greeting Andreas

Re: [NTG-context] $n\choose k$-issue with OpenType math fonts

2011-03-06 Thread Andreas Harder
and relax these primitives I'm fine with \binom{x}{y} etc. aditya: shouldn't we merge the m-newmath code into the core? +1 I can add some configurability to lfg files so that one can tune fonts but even then the value are debatable I don't know the best value either, but et least one could

[NTG-context] Problem: Arrows in math mode etc.

2009-04-16 Thread Tomas Kisela
stoptext In fact, it seems atopwithdelims() isn't working because the problem can be fixed by adding delimiterfactor=1001 defbinom#1#2{left(#1 atop #2right)} starttext startformula binom{a}{b} stopformula stoptext The second problem is much more bothering to me because I can't typeset limits

[NTG-context] Nath bugs?

2006-02-27 Thread Jay Belanger
I've been trying to make some notes on typesetting math in ConTeXt, and using nath seems the way to go. An odd thing about using \binom with nath: in displayed equations, it works fine, in inline equations, \binom{1}{2} will typeset 1(2) (with a raised 2). I suppose it's known that \startalign

[NTG-context] Re: Re: Re: nath catcode issues

2004-08-08 Thread Nikolai Weibull
\next\relax [EMAIL PROTECTED] \def\atop{% [EMAIL PROTECTED] command \string\atop } {No more a valid command. Use array instead.}% \let\next\relax [EMAIL PROTECTED] \def\choose{% [EMAIL PROTECTED] command \string\choose } {No more a valid command. Replace {A \choose B} with \binom

Re: [NTG-context] nath catcode issues

2004-07-05 Thread Giuseppe Bilotta
.}} [EMAIL PROTECTED] command \string\atop } {No more a valid command. Use array instead.}} [EMAIL PROTECTED] command \string\choose } {No more a valid command. Replace {A \choose B} with \binom A B.}} also messes up stuff in core-ref.tex for example: AHA! Good point. Try this fix: [EMAIL

[NTG-context] Re: nath catcode issues

2004-07-05 Thread Nikolai Weibull
} with \frac A [EMAIL PROTECTED] [EMAIL PROTECTED] command \string\atop } {No more a valid command. Use array [EMAIL PROTECTED] [EMAIL PROTECTED] command \string\choose } {No more a valid command. Replace {A \choose B} with \binom A [EMAIL PROTECTED] Ah, of course... nikolai -- ::: name

[NTG-context] Re: Re: nath catcode issues

2004-07-05 Thread Nikolai Weibull
} {No more a valid command. Replace {A \over B} with \frac A [EMAIL PROTECTED] [EMAIL PROTECTED] command \string\atop } {No more a valid command. Use array [EMAIL PROTECTED] [EMAIL PROTECTED] command \string\choose } {No more a valid command. Replace {A \choose B} with \binom

Re: Re[4]: [NTG-context] Known nath bugs?

2004-05-30 Thread Sebastian Sturm
I'm having all kinds of issues with nath (even without any preamble at all), like \binom{\frac 12}{a} not working, \to, \ot and \otto arrows not adjusting to the lengths of their subscripts, etc... and I can hardly imagine that all of these are nath bugs, so maybe something's wrong with my TeX